using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace iSun.Model
{
    [Serializable]
    [lite.Table]
    [Table("Photo", "Oid")]
    public class PhotoImage : BaseEntity
    {
        [lite.Column]
        public Guid Oid
        {
            get;
            set;
        }
          [lite.Column]
        public Guid PhotoID
        {
            get;
            set;
        }
         [lite.Column]
        public byte[] PhotImage
        {
            get;
            set;
        }


         private IEnumerable<String> Check()
         {
             return (new Validator<PhotoImage>(this)).validate(p => p.PhotImage.Length <= 0, "").ErrorMessage;
         }
    }



    [Serializable]
    [lite.Table]
    [Table("Photo", "Oid")]
    public class Photo : BaseEntity
    {
        [lite.Column]
        public Guid Oid
        {
            get;
            set;
        }
        [lite.Column]
        public string PhotoPath
        {
            get;
            set;
        }
        [lite.Column]
        public string PhotoDir
        {
            get;
            set;
        }
        [lite.Column]
        public string PhotoFileName
        {
            get;
            set;
        }
        [lite.Column]
        public Guid? AddUser
        {
            get;
            set;
        }
        [lite.Column]
        public string Author
        {
            get;
            set;
        }
        [lite.Column]
        public string UserName
        {
            get;
            set;
        }
        /// <summary>
        /// 
        /// </summary>
        [lite.Column]
        public DateTime? AddTime
        {
            get;
            set;
        }

        /// <summary>
        /// 
        /// </summary>
        [lite.Column]
        public string Notes
        {
            get;
            set;
        }

        /// <summary>
        /// 
        /// </summary>
        [lite.Column]
        public string Tags
        {
            get;
            set;
        }

        /// <summary>
        /// 
        /// </summary>
        [lite.Column]
        public string Extension
        {
            get;
            set;
        }

        /// <summary>
        /// 
        /// </summary>
        [lite.Column]
        public string FileSize
        {
            get;
            set;
        }
        [lite.Column]
        public string IsCommon
        {
            get;
            set;
        }


        [lite.Column]
        public string CameraManufacturer
        {
            get;
            set;
        }
        [lite.Column]
        public string CameraModel
        {
            get;
            set;
        }
        [lite.Column]
        public string Comment
        {
            get;
            set;
        }
        [lite.Column]
        public string CreationSoftware
        {
            get;
            set;
        }
        [lite.Column]
        public string Copyright
        {
            get;
            set;
        }
        [lite.Column]
        public string FocalLength
        {
            get;
            set;
        }


        [lite.Column]
        public string Description
        {
            get;
            set;
        }
        [lite.Column]
        public string Subject
        {
            get;
            set;
        }



        public PhotoImage iSun_ImageEntity
        {
            get;
            set;
        }
    }



    [Serializable]
    [lite.Table]
    [Table("V_Photo", "Oid")]
    public class vPhotoDetail : BaseEntity
    {
        [lite.Column]
        public Guid Oid
        {
            get;
            set;
        }

        [lite.Column]
        public string DIR
        {
            get;
            set;
        }

        [lite.Column]
        public string PhotoFileName
        {
            get;
            set;
        }

        [lite.Column]
        public Guid? AddUser
        {
            get;
            set;
        }
        [lite.Column]
        public string UserName
        {
            get;
            set;
        }
        /// <summary>
        /// 
        /// </summary>
        [lite.Column]
        public DateTime? AddTime
        {
            get;
            set;
        }

        /// <summary>
        /// 
        /// </summary>
        [lite.Column]
        public string Notes
        {
            get;
            set;
        }

        /// <summary>
        /// 
        /// </summary>
        [lite.Column]
        public string Tags
        {
            get;
            set;
        }

        /// <summary>
        /// 
        /// </summary>
        [lite.Column]
        public string Extension
        {
            get;
            set;
        }

        /// <summary>
        /// 
        /// </summary>
        [lite.Column]
        public string FileSize
        {
            get;
            set;
        }

        [lite.Column]
        public string IsCommon
        {
            get;
            set;
        }
        
        [lite.Column]
        public string SelfStyle
        {
            get;
            set;
        }
        [lite.Column]
        public string CommonStyle
        {
            get;
            set;
        }

        [lite.Column]
        public string Author
        {
            get;
            set;
        }
        [lite.Column]
        public string CameraManufacturer
        {
            get;
            set;
        }
        [lite.Column]
        public string CameraModel
        {
            get;
            set;
        }
        [lite.Column]
        public string Comment
        {
            get;
            set;
        }
        [lite.Column]
        public string CreationSoftware
        {
            get;
            set;
        }
        [lite.Column]
        public string Copyright
        {
            get;
            set;
        }

        [lite.Column]
        public string FocalLength
        {
            get;
            set;
        }

        [lite.Column]
        public Guid Dictionary
        {
            get;
            set;
        }

        [lite.Column]
        public string Description
        {
            get;
            set;
        }
        [lite.Column]
        public string Subject
        {
            get;
            set;
        }
    }


    [Serializable]
    [lite.Table]
    [Table("Photo", "Oid")]
    public class PhotoDetail : BaseEntity
    {
        [lite.Column]
        public Guid Oid
        {
            get;
            set;
        }


        [lite.Column]
        public string PhotoFileName
        {
            get;
            set;
        }

        [lite.Column]
        public Guid? AddUser
        {
            get;
            set;
        }
        [lite.Column]
        public string UserName
        {
            get;
            set;
        }
        /// <summary>
        /// 
        /// </summary>
        [lite.Column]
        public DateTime? AddTime
        {
            get;
            set;
        }

        /// <summary>
        /// 
        /// </summary>
        [lite.Column]
        public string Notes
        {
            get;
            set;
        }

        /// <summary>
        /// 
        /// </summary>
        [lite.Column]
        public string Tags
        {
            get;
            set;
        }

        /// <summary>
        /// 
        /// </summary>
        [lite.Column]
        public string Extension
        {
            get;
            set;
        }

        /// <summary>
        /// 
        /// </summary>
        [lite.Column]
        public string FileSize
        {
            get;
            set;
        }

        [lite.Column]
        public string IsCommon
        {
            get;
            set;
        }

        [lite.Column]
        public string SelfStyle
        {
            get;
            set;
        }
        [lite.Column]
        public string CommonStyle
        {
            get;
            set;
        }

        [lite.Column]
        public string Author
        {
            get;
            set;
        }
        [lite.Column]
        public string CameraManufacturer
        {
            get;
            set;
        }
        [lite.Column]
        public string CameraModel
        {
            get;
            set;
        }
        [lite.Column]
        public string Comment
        {
            get;
            set;
        }
        [lite.Column]
        public string CreationSoftware
        {
            get;
            set;
        }
        [lite.Column]
        public string Copyright
        {
            get;
            set;
        }

        [lite.Column]
        public string FocalLength
        {
            get;
            set;
        }

        [lite.Column]
        public Guid Dictionary
        {
            get;
            set;
        }

        [lite.Column]
        public string Description
        {
            get;
            set;
        }
        [lite.Column]
        public string Subject
        {
            get;
            set;
        }
    }

    [Serializable]
    [lite.Table]
    [Table("Book", "Oid")]
	public class  Book: BaseEntity
	{
		public Book()
		{

		}


		private System.Guid _Oid;

        [lite.Column]
		public System.Guid Oid
		{
 			get { return _Oid; }
			set { _Oid = value; }
		}

		private System.String _BookTitle;
        [lite.Column]
		public System.String BookTitle
		{
 			get { return _BookTitle; }
			set { _BookTitle = value; }
		}

		private System.String _SN;
        [lite.Column]
		public System.String SN
		{
 			get { return _SN; }
			set { _SN = value; }
		}

		private System.String _Version;
        [lite.Column]
		public System.String Version
		{
 			get { return _Version; }
			set { _Version = value; }
		}

		private System.String _BackCover;
        [lite.Column]
		public System.String BackCover
		{
 			get { return _BackCover; }
			set { _BackCover = value; }
		}

		private System.String _Author;
        [lite.Column]
		public System.String Author
		{
 			get { return _Author; }
			set { _Author = value; }
		}

		private System.String _CoverPage;
        [lite.Column]
		public System.String CoverPage
		{
 			get { return _CoverPage; }
			set { _CoverPage = value; }
		}

		private System.Guid _LinkBookID;
        [lite.Column]
		public System.Guid LinkBookID
		{
 			get { return _LinkBookID; }
			set { _LinkBookID = value; }
		}

		private System.DateTime _EditDate;
        [lite.Column]
		public System.DateTime EditDate
		{
 			get { return _EditDate; }
			set { _EditDate = value; }
		}

		private System.String _Notes;
        [lite.Column]
		public System.String Notes
		{
 			get { return _Notes; }
			set { _Notes = value; }
		}

		private System.String _VersionNotes;
        [lite.Column]
		public System.String VersionNotes
		{
 			get { return _VersionNotes; }
			set { _VersionNotes = value; }
		}

		private System.String _Keywords;
        [lite.Column]
		public System.String Keywords
		{
 			get { return _Keywords; }
			set { _Keywords = value; }
		}

		private System.Int32 _TotalPage;
        [lite.Column]
		public System.Int32 TotalPage
		{
 			get { return _TotalPage; }
			set { _TotalPage = value; }
		}

		private System.Guid _AddUser;
        [lite.Column]
        public System.Guid AddUser
		{
 			get { return _AddUser; }
			set { _AddUser = value; }
		}

		private System.DateTime _AddTime;
        [lite.Column]
		public System.DateTime AddTime
		{
 			get { return _AddTime; }
			set { _AddTime = value; }
		}

		private System.String _EditWho;
        [lite.Column]
		public System.String EditWho
		{
 			get { return _EditWho; }
			set { _EditWho = value; }
		}

		private System.String _PhotoDir;
        [lite.Column]
		public System.String PhotoDir
		{
 			get { return _PhotoDir; }
			set { _PhotoDir = value; }
		}
	}
}
